package dao;

import db.DBConfig;
import db.DBConntection;

import javax.servlet.ServletContext;
import java.sql.Connection;

public class BaseDAO {

    public DBConfig config;

    public BaseDAO() {
        //TODO:通过配置文件配置连接信息
        DBConfig config = new DBConfig("jdbc:mysql://localhost:3360/itoffer?useUnicode=true&characterEncoding=utf8", "root", "docker");
        this.config = config;
    }

    public Connection getConnection() {
        return (new DBConntection(config)).getConnection();
    }


}
